<?php

namespace App\Server;

use Hyperf\Contract\OnPacketInterface;

class UdpServer implements OnPacketInterface
{
    public function onPacket($server, $data, $clientInfo): void
    {
        $server->sendto($clientInfo['address'], $clientInfo['port'], 'Server：' . $data);
    }
}